package com.qzsoft.zhjd.materiel.modules.materielconsume.enums;

/**
 * @ClassName MaterielConsumeEnums
 * @Description 原材料消耗枚举类型
 * @author linhuawei
 * @since 2022-04-05
 */
public enum MaterielConsumeEnums {

    asphalt("沥青", "7c85324ed873fe292481a387bcf12a38", "db0fd12a515503c8e0be658a84c59cfd"), 
    cement("水泥", "55f7c29ae11c9909c65cb81d816f1121", "bf9b7838aff3ceaeacb1dca0fd418c0e"),
    gravel("砂石料", "deca58e06fd648eea2f713fa36fc93a6", "26b0a3a525023a2d583d1df0aaed4dd4");

    private String materielItemName;

    private String materielItemId;

    private String materielItemPkid;

    private MaterielConsumeEnums(String materielItemName, String materielItemId, String materielItemPkid) {
        this.materielItemName = materielItemName;
        this.materielItemId = materielItemId;
        this.materielItemPkid = materielItemPkid;
    }

    public String getMaterielItemName() {
        return materielItemName;
    }

    public String getMaterielItemId() {
        return materielItemId;
    }

    public String getMaterielItemPkid() {
        return materielItemPkid;
    }

    public static String getById(String id) {
        if (null != id) {
            for (MaterielConsumeEnums item : MaterielConsumeEnums.values()) {
                if (id.equals(item.getMaterielItemId())) {
                    return item.getMaterielItemName();
                }
            }
        }
        return null;
    }

}
